/*
 * @Author: doing
 * @Date: 2023-08-22 10:33:28
 * @LastEditors: git config user.name && git config user.email
 * @LastEditTime: 2023-08-26 18:15:53
 * @FilePath: \background-management-system\src\api\picture.js
 * @Description: 
 * 图片管理接口
 * Copyright (c) 2023 by 1540265624@qq.com, All Rights Reserved. 
 */
import axios from '~/axios.js'
//图片列表
export function getPicList(body){
    return axios.post('/content/photo/search',body)
}

//新增图片
export function addPicList(body){
    return axios.post('/content/photo',body)
}

//修改图片信息
export function updataPicList(body){
    return axios.put('/content/photo',body)
}

//根据id删除图片
export function deletePicList(id){
    return axios.delete(`/content/photo/${id}`)
}

//上传图片接口 data直接是FormData对象
export function uploadPic(body){
    return axios.post('/content/file/upload',body)
}

//删除图片接口
export function deletePic(fileUrl){
    return axios.delete('/content/file/delete',{
        params:{
            fileUrl
        }
    })
}




